package speed2010.util;

import java.io.Serializable;

import speed2010.middleware.comunicacao.Address;

public class AddressCustoEId implements Serializable {
	private Address address = null;
	private int custo = -1;
	private long id = -1;

	public AddressCustoEId(Address address, int custo, long id) {
		super();
		this.address = address;
		this.custo = custo;
		this.id = id;
	}
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	public int getCusto() {
		return custo;
	}

	public void setCusto(int custo) {
		this.custo = custo;
	}

	@Override
	public boolean equals(Object obj) {
		return this.address.equals(((AddressCustoEId) obj).getAddress())
				&& this.custo == ((AddressCustoEId) obj).custo
				&& this.id == ((AddressCustoEId) obj).id;
	}

}
